package org.hy.pay.common.core.page;

import java.io.Serializable;

public class PageParam implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	/**
	 * 默认第一页
	 */
	public static final int DEFAULT_PAGE_NUM =1;
	/**
	 * 默认记录（15）
	 */
	public static final int DEFAULT_NUM_PER_PAGE = 15;
	/**
	 * 最大每页记录数 10000
	 */
	public static final int MAX_PAGE_SIZE= 10000;
	
	private int pageNum = DEFAULT_PAGE_NUM;//当前页数
	
	private int numPerPage;// 每页记录数 
	
	public PageParam(){}
	
	public PageParam(int pageNum,int numPerPage){
		this.pageNum = pageNum;
		this.numPerPage = numPerPage;
	}
	
	public int getPageNum(){
		return pageNum;
	}
	public void setPageNum(int pageNum){
		this.pageNum = pageNum;
	}
	public int getNumPerPage(){
		return numPerPage > 0 ? numPerPage : DEFAULT_NUM_PER_PAGE;
	}
	public void setNumPerPage(int numPerPage){
		this.numPerPage = numPerPage;
	}
}
